Math.lg = function(x){
	return Math.log(x)/Math.log(10);
};

Math.ln = function(x){
	return Math.log(x);
};

Math.fac = function(x){
	var p = 1;
	for(var i = 2; i <= x; i++){
		p*= i;
	}
	return p;
};

Math.pow2n = function(x){
	return Math.pow(2, x);
};

Math.sinh = function(x){
	return (Math.exp(x) - Math.exp(-x)) / 2;
};

Math.cosh = function(x){
	return (Math.exp(x) + Math.exp(-x)) / 2;
};

Math.tanh = function(x){
	return (Math.exp(x) - Math.exp(-x)) / (Math.exp(x) + Math.exp(-x));
};

Math.asinh = function(x){
	return Math.log(x + Math.sqrt(x * x + 1));
};

Math.acosh = function(x){
	return Math.log(x + Math.sqrt(x * x - 1));
};

Math.atanh = function(x){
	return Math.log((1 + x)/(1 - x)) / 2;
};